<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GtkTextMark</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="GTK+ 3 参考手册">
<link rel="up" href="TextWidgetObjects.html" title="多行文本编辑器">
<link rel="prev" href="gtk3-GtkTextIter.html" title="GtkTextIter">
<link rel="next" href="gtk3-GtkTextBuffer.html" title="GtkTextBuffer">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="gtk3-GtkTextIter.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="TextWidgetObjects.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GTK+ 3 参考手册</th>
<td><a accesskey="n" href="gtk3-GtkTextBuffer.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#gtk3-GtkTextMark.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#gtk3-GtkTextMark.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="gtk3-GtkTextMark"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gtk3-GtkTextMark.top_of_page"></a>GtkTextMark</span></h2>
<p>GtkTextMark</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="gtk3-GtkTextMark.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;gtk/gtk.h&gt;

struct              <a class="link" href="gtk3-GtkTextMark.html#GtkTextMark" title="struct GtkTextMark">GtkTextMark</a>;
<a class="link" href="gtk3-GtkTextMark.html#GtkTextMark" title="struct GtkTextMark"><span class="returnvalue">GtkTextMark</span></a> *       <a class="link" href="gtk3-GtkTextMark.html#gtk-text-mark-new" title="gtk_text_mark_new ()">gtk_text_mark_new</a>                   (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> left_gravity</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="gtk3-GtkTextMark.html#gtk-text-mark-set-visible" title="gtk_text_mark_set_visible ()">gtk_text_mark_set_visible</a>           (<em class="parameter"><code><a class="link" href="gtk3-GtkTextMark.html#GtkTextMark" title="struct GtkTextMark"><span class="type">GtkTextMark</span></a> *mark</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> setting</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gtk3-GtkTextMark.html#gtk-text-mark-get-visible" title="gtk_text_mark_get_visible ()">gtk_text_mark_get_visible</a>           (<em class="parameter"><code><a class="link" href="gtk3-GtkTextMark.html#GtkTextMark" title="struct GtkTextMark"><span class="type">GtkTextMark</span></a> *mark</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gtk3-GtkTextMark.html#gtk-text-mark-get-deleted" title="gtk_text_mark_get_deleted ()">gtk_text_mark_get_deleted</a>           (<em class="parameter"><code><a class="link" href="gtk3-GtkTextMark.html#GtkTextMark" title="struct GtkTextMark"><span class="type">GtkTextMark</span></a> *mark</code></em>);
const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       <a class="link" href="gtk3-GtkTextMark.html#gtk-text-mark-get-name" title="gtk_text_mark_get_name ()">gtk_text_mark_get_name</a>              (<em class="parameter"><code><a class="link" href="gtk3-GtkTextMark.html#GtkTextMark" title="struct GtkTextMark"><span class="type">GtkTextMark</span></a> *mark</code></em>);
<a class="link" href="gtk3-GtkTextBuffer.html#GtkTextBuffer" title="GtkTextBuffer"><span class="returnvalue">GtkTextBuffer</span></a> *     <a class="link" href="gtk3-GtkTextMark.html#gtk-text-mark-get-buffer" title="gtk_text_mark_get_buffer ()">gtk_text_mark_get_buffer</a>            (<em class="parameter"><code><a class="link" href="gtk3-GtkTextMark.html#GtkTextMark" title="struct GtkTextMark"><span class="type">GtkTextMark</span></a> *mark</code></em>);
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="gtk3-GtkTextMark.html#gtk-text-mark-get-left-gravity" title="gtk_text_mark_get_left_gravity ()">gtk_text_mark_get_left_gravity</a>      (<em class="parameter"><code><a class="link" href="gtk3-GtkTextMark.html#GtkTextMark" title="struct GtkTextMark"><span class="type">GtkTextMark</span></a> *mark</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="gtk3-GtkTextMark.description"></a><h2>Description</h2>
<p>
</p>
</div>
<div class="refsect1">
<a name="gtk3-GtkTextMark.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GtkTextMark"></a><h3>struct GtkTextMark</h3>
<pre class="programlisting">struct GtkTextMark {
  GObject parent_instance;
};
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-text-mark-new"></a><h3>gtk_text_mark_new ()</h3>
<pre class="programlisting"><a class="link" href="gtk3-GtkTextMark.html#GtkTextMark" title="struct GtkTextMark"><span class="returnvalue">GtkTextMark</span></a> *       gtk_text_mark_new                   (<em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> left_gravity</code></em>);</pre>
<p>
Creates a text mark. Add it to a buffer using <a class="link" href="gtk3-GtkTextBuffer.html#gtk-text-buffer-add-mark" title="gtk_text_buffer_add_mark ()"><code class="function">gtk_text_buffer_add_mark()</code></a>.
If <em class="parameter"><code>name</code></em> is <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the mark is anonymous; otherwise, the mark can be 
retrieved by name using <a class="link" href="gtk3-GtkTextBuffer.html#gtk-text-buffer-get-mark" title="gtk_text_buffer_get_mark ()"><code class="function">gtk_text_buffer_get_mark()</code></a>. If a mark has left 
gravity, and text is inserted at the mark's current location, the mark 
will be moved to the left of the newly-inserted text. If the mark has 
right gravity (<em class="parameter"><code>left_gravity</code></em> = <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>), the mark will end up on the 
right of newly-inserted text. The standard left-to-right cursor is a 
mark with right gravity (when you type, the cursor stays on the right
side of the text you're typing).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>mark name or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>left_gravity</code></em> :</span></p></td>
<td>whether the mark should have left gravity</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>new <a class="link" href="gtk3-GtkTextMark.html#GtkTextMark" title="struct GtkTextMark"><span class="type">GtkTextMark</span></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.12</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-text-mark-set-visible"></a><h3>gtk_text_mark_set_visible ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_text_mark_set_visible           (<em class="parameter"><code><a class="link" href="gtk3-GtkTextMark.html#GtkTextMark" title="struct GtkTextMark"><span class="type">GtkTextMark</span></a> *mark</code></em>,
                                                         <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> setting</code></em>);</pre>
<p>
Sets the visibility of <em class="parameter"><code>mark</code></em>; the insertion point is normally
visible, i.e. you can see it as a vertical bar. Also, the text
widget uses a visible mark to indicate where a drop will occur when
dragging-and-dropping text. Most other marks are not visible.
Marks are not visible by default.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>mark</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkTextMark.html#GtkTextMark" title="struct GtkTextMark"><span class="type">GtkTextMark</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>setting</code></em> :</span></p></td>
<td>visibility of mark</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-text-mark-get-visible"></a><h3>gtk_text_mark_get_visible ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gtk_text_mark_get_visible           (<em class="parameter"><code><a class="link" href="gtk3-GtkTextMark.html#GtkTextMark" title="struct GtkTextMark"><span class="type">GtkTextMark</span></a> *mark</code></em>);</pre>
<p>
Returns <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the mark is visible (i.e. a cursor is displayed
for it).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>mark</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkTextMark.html#GtkTextMark" title="struct GtkTextMark"><span class="type">GtkTextMark</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if visible</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-text-mark-get-deleted"></a><h3>gtk_text_mark_get_deleted ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gtk_text_mark_get_deleted           (<em class="parameter"><code><a class="link" href="gtk3-GtkTextMark.html#GtkTextMark" title="struct GtkTextMark"><span class="type">GtkTextMark</span></a> *mark</code></em>);</pre>
<p>
Returns <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the mark has been removed from its buffer
with <a class="link" href="gtk3-GtkTextBuffer.html#gtk-text-buffer-delete-mark" title="gtk_text_buffer_delete_mark ()"><code class="function">gtk_text_buffer_delete_mark()</code></a>. See <a class="link" href="gtk3-GtkTextBuffer.html#gtk-text-buffer-add-mark" title="gtk_text_buffer_add_mark ()"><code class="function">gtk_text_buffer_add_mark()</code></a>
for a way to add it to a buffer again.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>mark</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkTextMark.html#GtkTextMark" title="struct GtkTextMark"><span class="type">GtkTextMark</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>whether the mark is deleted</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-text-mark-get-name"></a><h3>gtk_text_mark_get_name ()</h3>
<pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       gtk_text_mark_get_name              (<em class="parameter"><code><a class="link" href="gtk3-GtkTextMark.html#GtkTextMark" title="struct GtkTextMark"><span class="type">GtkTextMark</span></a> *mark</code></em>);</pre>
<p>
Returns the mark name; returns NULL for anonymous marks.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>mark</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkTextMark.html#GtkTextMark" title="struct GtkTextMark"><span class="type">GtkTextMark</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>mark name</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-text-mark-get-buffer"></a><h3>gtk_text_mark_get_buffer ()</h3>
<pre class="programlisting"><a class="link" href="gtk3-GtkTextBuffer.html#GtkTextBuffer" title="GtkTextBuffer"><span class="returnvalue">GtkTextBuffer</span></a> *     gtk_text_mark_get_buffer            (<em class="parameter"><code><a class="link" href="gtk3-GtkTextMark.html#GtkTextMark" title="struct GtkTextMark"><span class="type">GtkTextMark</span></a> *mark</code></em>);</pre>
<p>
Gets the buffer this mark is located inside,
or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the mark is deleted.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>mark</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkTextMark.html#GtkTextMark" title="struct GtkTextMark"><span class="type">GtkTextMark</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the mark's <a class="link" href="gtk3-GtkTextBuffer.html#GtkTextBuffer" title="GtkTextBuffer"><span class="type">GtkTextBuffer</span></a>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-text-mark-get-left-gravity"></a><h3>gtk_text_mark_get_left_gravity ()</h3>
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            gtk_text_mark_get_left_gravity      (<em class="parameter"><code><a class="link" href="gtk3-GtkTextMark.html#GtkTextMark" title="struct GtkTextMark"><span class="type">GtkTextMark</span></a> *mark</code></em>);</pre>
<p>
Determines whether the mark has left gravity.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>mark</code></em> :</span></p></td>
<td>a <a class="link" href="gtk3-GtkTextMark.html#GtkTextMark" title="struct GtkTextMark"><span class="type">GtkTextMark</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the mark has left gravity, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>